import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_app/BaseMaterialWidget.dart';
import 'package:flutter_app/page_ten/Product.dart';
import 'package:flutter_app/page_ten/RouteDetail.dart';

class RouteDemo extends BaseMaterialWidget {
  @override
  Widget buildContent(BuildContext context) {
    return Center(
      child: RaisedButton(
        onPressed: () {
          Navigator.push(
              context,
              MaterialPageRoute(
                  builder: (context) => RouteDetail(Product('上精品', '商品描述'))));
        },
        child: Text('查看详情页'),
      ),
    );
  }

  @override
  String getTitle() {
    return "路由导航";
  }
}
